<template>
  <div id="app">
    <div class="main" v-if="getToken">
      <div class="menu">
        <Menu></Menu>
      </div> 
      <div class="right">
        <div class="right_breadcrumb">
            <Breadcrumb class="breadcrumb"></Breadcrumb>
          </div>
          <router-view/>
        </div>
    </div>
    <router-view v-if="!getToken"/>
   </div>
</template>

<script>
import Breadcrumb from '@/components/nav_menu/Breadcrumb.vue'
import Menu from '@/components/nav_menu/Menu'
import { getToken } from '@/utils/auth' // 验权
export default {
  name: 'App',
  data () {
    return {
      getToken:getToken()
    }
  },
  components:{
    Breadcrumb,
    Menu
  }
}

</script>

<style lang="scss">
#app{
  height: 100%;
  width: 100%;
  .main{
    display: flex;
    .menu{  
      position: fixed;
      left: 0;
      height: 100vh;
      z-index: 1001;
    }
    .right{
      margin-left: 180px;
      flex-grow: 1;
    }
    
  }
 
}
</style>
